package com.bcbim.smart_water.inspection.service;

import com.bcbim.smart_water.inspection.mapper.InspectionPositionMapper;
import com.bcbim.smart_water_interface.inspection.dao.InspectionPositionDAO;
import com.bcbim.smart_water_interface.inspection.dto.InspectionPositionDTO;
import com.bcbim.smart_water_interface.inspection.service.InspectionPositionService;
import com.bcbim.smart_water_interface.inspection.vo.InspectionPositionListVO;
import com.bcbim.smart_water_interface.inspection.vo.InspectionPositionVO;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service(timeout = 60 * 1000, group = "inspectionPosition", version = "1.0.0")
public class InspectionPositionServiceImpl implements InspectionPositionService {

    @Autowired
    private InspectionPositionMapper inspectionPositionMapper;

    @Override
    public int countInspectionPosition(InspectionPositionDTO inspectionPositionDTO) {
        return inspectionPositionMapper.countInspectionPosition(inspectionPositionDTO);
    }

    @Override
    public List<InspectionPositionListVO> listInspectionPosition(InspectionPositionDTO inspectionPositionDTO) {
        return inspectionPositionMapper.listInspectionPosition(inspectionPositionDTO);
    }

    @Override
    public List<InspectionPositionVO> getInspectionPosition(String inspectionId) {
        return inspectionPositionMapper.getInspectionPosition(inspectionId);
    }

    @Override
    public int insertInspectionPosition(InspectionPositionDAO inspectionPositionDAO) {
        return inspectionPositionMapper.insertInspectionPosition(inspectionPositionDAO);
    }
}
